// import axios from "axios";
import http from "@/utils/http";

export default {
  namespaced: true,

  state: {
    agentstateList: []
  },

  mutations: {
    SETAGENTSTATELIST(state, list) {
      state.agentstateList = list;
    }
  },

  actions: {
    getAgentstateList({ commit }, time) {
      http
        .post(
          "/api/rule/agent_report/agent_settlement?token=2Q3ntNqyo5eaLmXITABb",
          {
            time
          }
        )
        .then(response => {
          let res = response.data.list;
          console.log(res);
          commit("SETAGENTSTATELIST", res);
        });
    }
  }
};
